home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 6_2008-2009.ISO / data / zips / Simple_Lib2147933282009.psc / Espiritu Santo School / borrowing.frm < prev    next >
Text File  |  2009-03-28  |  25KB  |  863 lines

  1. VERSION 5.00
  2. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  3. Object = "{8E27C92E-1264-101C-8A2F-040224009C02}#7.0#0"; "MSCAL.OCX"
  4. Begin VB.Form Form2 
  5.    BorderStyle     =   0  'None
  6.    Caption         =   "Borrowing Section"
  7.    ClientHeight    =   7050
  8.    ClientLeft      =   3030
  9.    ClientTop       =   1260
  10.    ClientWidth     =   9375
  11.    BeginProperty Font 
  12.       Name            =   "Tahoma"
  13.       Size            =   9.75
  14.       Charset         =   0
  15.       Weight          =   400
  16.       Underline       =   0   'False
  17.       Italic          =   0   'False
  18.       Strikethrough   =   0   'False
  19.    EndProperty
  20.    ForeColor       =   &H8000000F&
  21.    LinkTopic       =   "Form2"
  22.    ScaleHeight     =   7050
  23.    ScaleWidth      =   9375
  24.    ShowInTaskbar   =   0   'False
  25.    Begin VB.TextBox Text6 
  26.       Appearance      =   0  'Flat
  27.       Height          =   315
  28.       Left            =   1920
  29.       TabIndex        =   0
  30.       Top             =   1800
  31.       Width           =   2295
  32.    End
  33.    Begin MSACAL.Calendar Calendar1 
  34.       Height          =   2175
  35.       Left            =   6600
  36.       TabIndex        =   40
  37.       Top             =   5160
  38.       Visible         =   0   'False
  39.       Width           =   2415
  40.       _Version        =   524288
  41.       _ExtentX        =   4260
  42.       _ExtentY        =   3836
  43.       _StockProps     =   1
  44.       BackColor       =   -2147483633
  45.       Year            =   2002
  46.       Month           =   9
  47.       Day             =   19
  48.       DayLength       =   0
  49.       MonthLength     =   0
  50.       DayFontColor    =   0
  51.       FirstDay        =   1
  52.       GridCellEffect  =   0
  53.       GridFontColor   =   10485760
  54.       GridLinesColor  =   0
  55.       ShowDateSelectors=   -1  'True
  56.       ShowDays        =   -1  'True
  57.       ShowHorizontalGrid=   -1  'True
  58.       ShowTitle       =   -1  'True
  59.       ShowVerticalGrid=   -1  'True
  60.       TitleFontColor  =   10485760
  61.       ValueIsNull     =   0   'False
  62.       BeginProperty DayFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  63.          Name            =   "Arial"
  64.          Size            =   8.25
  65.          Charset         =   0
  66.          Weight          =   700
  67.          Underline       =   0   'False
  68.          Italic          =   0   'False
  69.          Strikethrough   =   0   'False
  70.       EndProperty
  71.       BeginProperty GridFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  72.          Name            =   "Arial"
  73.          Size            =   8.25
  74.          Charset         =   0
  75.          Weight          =   400
  76.          Underline       =   0   'False
  77.          Italic          =   0   'False
  78.          Strikethrough   =   0   'False
  79.       EndProperty
  80.       BeginProperty TitleFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  81.          Name            =   "Arial"
  82.          Size            =   12
  83.          Charset         =   0
  84.          Weight          =   700
  85.          Underline       =   0   'False
  86.          Italic          =   0   'False
  87.          Strikethrough   =   0   'False
  88.       EndProperty
  89.    End
  90.    Begin VB.Timer Timer1 
  91.       Interval        =   1000
  92.       Left            =   8880
  93.       Top             =   0
  94.    End
  95.    Begin MSComctlLib.StatusBar StatusBar1 
  96.       Align           =   2  'Align Bottom
  97.       Height          =   255
  98.       Left            =   0
  99.       TabIndex        =   35
  100.       Top             =   6795
  101.       Width           =   9375
  102.       _ExtentX        =   16536
  103.       _ExtentY        =   450
  104.       SimpleText      =   "klk"
  105.       _Version        =   393216
  106.       BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
  107.          NumPanels       =   3
  108.          BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
  109.             AutoSize        =   1
  110.             Object.Width           =   11351
  111.             Text            =   "C.M. Recto High School Library System"
  112.             TextSave        =   "C.M. Recto High School Library System"
  113.          EndProperty
  114.          BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
  115.             Style           =   6
  116.             TextSave        =   "3/28/2009"
  117.          EndProperty
  118.          BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
  119.             Style           =   5
  120.             TextSave        =   "3:12 PM"
  121.          EndProperty
  122.       EndProperty
  123.    End
  124.    Begin VB.CommandButton CMDClose 
  125.       Caption         =   "&Close"
  126.       Height          =   855
  127.       Left            =   6000
  128.       Picture         =   "borrowing.frx":0000
  129.       Style           =   1  'Graphical
  130.       TabIndex        =   18
  131.       Top             =   5760
  132.       Width           =   975
  133.    End
  134.    Begin VB.CommandButton CMDview 
  135.       Caption         =   "&View"
  136.       Height          =   855
  137.       Left            =   5040
  138.       Picture         =   "borrowing.frx":0442
  139.       Style           =   1  'Graphical
  140.       TabIndex        =   17
  141.       Top             =   5760
  142.       Width           =   975
  143.    End
  144.    Begin VB.CommandButton CMDrefresh 
  145.       Caption         =   "&Refresh"
  146.       Height          =   855
  147.       Left            =   4080
  148.       Picture         =   "borrowing.frx":0884
  149.       Style           =   1  'Graphical
  150.       TabIndex        =   16
  151.       Top             =   5760
  152.       Width           =   975
  153.    End
  154.    Begin VB.CommandButton CMDsearch 
  155.       Caption         =   "S&earch"
  156.       Height          =   855
  157.       Left            =   3120
  158.       Picture         =   "borrowing.frx":09CE
  159.       Style           =   1  'Graphical
  160.       TabIndex        =   15
  161.       Top             =   5760
  162.       Width           =   975
  163.    End
  164.    Begin VB.CommandButton CMDsave 
  165.       Caption         =   "&Save"
  166.       Height          =   855
  167.       Left            =   2160
  168.       Picture         =   "borrowing.frx":0E10
  169.       Style           =   1  'Graphical
  170.       TabIndex        =   14
  171.       Top             =   5760
  172.       Width           =   975
  173.    End
  174.    Begin VB.Frame Frame4 
  175.       Caption         =   "Book Information"
  176.       Height          =   4935
  177.       Left            =   4680
  178.       TabIndex        =   27
  179.       Top             =   600
  180.       Width           =   4575
  181.       Begin VB.ComboBox Combo1 
  182.          Appearance      =   0  'Flat
  183.          Height          =   360
  184.          ItemData        =   "borrowing.frx":1252
  185.          Left            =   2160
  186.          List            =   "borrowing.frx":125C
  187.          TabIndex        =   12
  188.          Text            =   "Combo1"
  189.          Top             =   3840
  190.          Width           =   1935
  191.       End
  192.       Begin VB.Frame Frame2 
  193.          Caption         =   "Search"
  194.          Height          =   1335
  195.          Left            =   240
  196.          TabIndex        =   28
  197.          Top             =   600
  198.          Width           =   4215
  199.          Begin VB.TextBox Text7 
  200.             Appearance      =   0  'Flat
  201.             Height          =   315
  202.             Left            =   1680
  203.             TabIndex        =   7
  204.             Top             =   600
  205.             Width           =   2295
  206.          End
  207.          Begin VB.Label Label1 
  208.             BackStyle       =   0  'Transparent
  209.             Caption         =   "Aquisition No:"
  210.             Height          =   255
  211.             Index           =   6
  212.             Left            =   480
  213.             TabIndex        =   29
  214.             Top             =   600
  215.             Width           =   1215
  216.          End
  217.          Begin VB.Image Image6 
  218.             Height          =   1290
  219.             Left            =   0
  220.             Picture         =   "borrowing.frx":127A
  221.             Stretch         =   -1  'True
  222.             Top             =   0
  223.             Width           =   4200
  224.          End
  225.       End
  226.       Begin VB.TextBox Text8 
  227.          Appearance      =   0  'Flat
  228.          Height          =   360
  229.          Left            =   2160
  230.          TabIndex        =   8
  231.          Top             =   2400
  232.          Width           =   1935
  233.       End
  234.       Begin VB.TextBox Text9 
  235.          Appearance      =   0  'Flat
  236.          Height          =   360
  237.          Left            =   2160
  238.          TabIndex        =   9
  239.          Top             =   2760
  240.          Width           =   1935
  241.       End
  242.       Begin VB.TextBox Text10 
  243.          Appearance      =   0  'Flat
  244.          Height          =   360
  245.          Left            =   2160
  246.          TabIndex        =   10
  247.          Top             =   3120
  248.          Width           =   1935
  249.       End
  250.       Begin VB.TextBox Text11 
  251.          Appearance      =   0  'Flat
  252.          Height          =   360
  253.          Left            =   2160
  254.          TabIndex        =   11
  255.          Top             =   3480
  256.          Width           =   1935
  257.       End
  258.       Begin VB.CommandButton Command1 
  259.          Caption         =   "..."
  260.          Height          =   375
  261.          Left            =   4080
  262.          TabIndex        =   39
  263.          Top             =   4200
  264.          Width           =   375
  265.       End
  266.       Begin VB.TextBox Text12 
  267.          Appearance      =   0  'Flat
  268.          Height          =   360
  269.          Left            =   2160
  270.          TabIndex        =   13
  271.          Top             =   4200
  272.          Width           =   1935
  273.       End
  274.       Begin VB.Image Image9 
  275.          Height          =   735
  276.          Left            =   240
  277.          Picture         =   "borrowing.frx":152F0
  278.          Top             =   240
  279.          Width           =   2655
  280.       End
  281.       Begin VB.Label Label1 
  282.          Alignment       =   1  'Right Justify
  283.          BackStyle       =   0  'Transparent
  284.          Caption         =   "Due Date: "
  285.          Height          =   255
  286.          Index           =   12
  287.          Left            =   240
  288.          TabIndex        =   36
  289.          Top             =   4200
  290.          Width           =   1815
  291.       End
  292.       Begin VB.Label Label1 
  293.          Alignment       =   1  'Right Justify
  294.          BackStyle       =   0  'Transparent
  295.          Caption         =   "Title of the book:"
  296.          Height          =   255
  297.          Index           =   7
  298.          Left            =   360
  299.          TabIndex        =   34
  300.          Top             =   2400
  301.          Width           =   1680
  302.       End
  303.       Begin VB.Label Label1 
  304.          Alignment       =   1  'Right Justify
  305.          BackStyle       =   0  'Transparent
  306.          Caption         =   "Aquisition No:"
  307.          Height          =   375
  308.          Index           =   8
  309.          Left            =   600
  310.          TabIndex        =   33
  311.          Top             =   2760
  312.          Width           =   1455
  313.       End
  314.       Begin VB.Label Label1 
  315.          Alignment       =   1  'Right Justify
  316.          BackStyle       =   0  'Transparent
  317.          Caption         =   "Author:"
  318.          Height          =   255
  319.          Index           =   9
  320.          Left            =   1320
  321.          TabIndex        =   32
  322.          Top             =   3120
  323.          Width           =   735
  324.       End
  325.       Begin VB.Label Label1 
  326.          Alignment       =   1  'Right Justify
  327.          BackStyle       =   0  'Transparent
  328.          Caption         =   "Publisher"
  329.          Height          =   255
  330.          Index           =   10
  331.          Left            =   840
  332.          TabIndex        =   31
  333.          Top             =   3480
  334.          Width           =   1215
  335.       End
  336.       Begin VB.Label Label1 
  337.          Alignment       =   1  'Right Justify
  338.          BackStyle       =   0  'Transparent
  339.          Caption         =   "Status"
  340.          Height          =   255
  341.          Index           =   11
  342.          Left            =   840
  343.          TabIndex        =   30
  344.          Top             =   3840
  345.          Width           =   1215
  346.       End
  347.       Begin VB.Image Image4 
  348.          Height          =   4980
  349.          Left            =   0
  350.          Picture         =   "borrowing.frx":1B906
  351.          Stretch         =   -1  'True
  352.          Top             =   0
  353.          Width           =   4635
  354.       End
  355.    End
  356.    Begin VB.Frame Frame3 
  357.       Caption         =   "Student Information"
  358.       Height          =   4935
  359.       Left            =   120
  360.       TabIndex        =   19
  361.       Top             =   600
  362.       Width           =   4575
  363.       Begin VB.Frame Frame1 
  364.          Caption         =   "Search"
  365.          Height          =   1335
  366.          Left            =   240
  367.          TabIndex        =   20
  368.          Top             =   600
  369.          Width           =   4095
  370.          Begin VB.Label Label1 
  371.             BackStyle       =   0  'Transparent
  372.             Caption         =   "I.D. No:"
  373.             Height          =   255
  374.             Index           =   5
  375.             Left            =   840
  376.             TabIndex        =   21
  377.             Top             =   600
  378.             Width           =   735
  379.          End
  380.          Begin VB.Image Image7 
  381.             Height          =   1290
  382.             Left            =   0
  383.             Picture         =   "borrowing.frx":62E20
  384.             Stretch         =   -1  'True
  385.             Top             =   0
  386.             Width           =   4080
  387.          End
  388.       End
  389.       Begin VB.TextBox Text1 
  390.          Appearance      =   0  'Flat
  391.          Height          =   360
  392.          Left            =   1920
  393.          TabIndex        =   1
  394.          Top             =   2400
  395.          Width           =   1935
  396.       End
  397.       Begin VB.TextBox Text2 
  398.          Appearance      =   0  'Flat
  399.          Height          =   360
  400.          Left            =   1920
  401.          TabIndex        =   2
  402.          Top             =   2760
  403.          Width           =   1935
  404.       End
  405.       Begin VB.TextBox Text3 
  406.          Appearance      =   0  'Flat
  407.          Height          =   360
  408.          Left            =   1920
  409.          TabIndex        =   3
  410.          Top             =   3120
  411.          Width           =   1935
  412.       End
  413.       Begin VB.TextBox Text4 
  414.          Appearance      =   0  'Flat
  415.          Height          =   360
  416.          Left            =   1920
  417.          TabIndex        =   4
  418.          Top             =   3480
  419.          Width           =   1935
  420.       End
  421.       Begin VB.TextBox Text5 
  422.          Appearance      =   0  'Flat
  423.          Height          =   360
  424.          Left            =   1920
  425.          TabIndex        =   5
  426.          Top             =   3840
  427.          Width           =   1935
  428.       End
  429.       Begin VB.Image Image8 
  430.          Height          =   735
  431.          Left            =   240
  432.          Picture         =   "borrowing.frx":76E96
  433.          Top             =   240
  434.          Width           =   2655
  435.       End
  436.       Begin VB.Label Label2 
  437.          Alignment       =   2  'Center
  438.          Appearance      =   0  'Flat
  439.          BackColor       =   &H80000005&
  440.          BorderStyle     =   1  'Fixed Single
  441.          BeginProperty Font 
  442.             Name            =   "Tahoma"
  443.             Size            =   8.25
  444.             Charset         =   0
  445.             Weight          =   400
  446.             Underline       =   0   'False
  447.             Italic          =   0   'False
  448.             Strikethrough   =   0   'False
  449.          EndProperty
  450.          ForeColor       =   &H80000008&
  451.          Height          =   375
  452.          Left            =   1920
  453.          TabIndex        =   6
  454.          Top             =   4200
  455.          Width           =   1935
  456.       End
  457.       Begin VB.Label Label1 
  458.          Alignment       =   1  'Right Justify
  459.          BackStyle       =   0  'Transparent
  460.          Caption         =   "Date and Time:"
  461.          Height          =   255
  462.          Index           =   15
  463.          Left            =   360
  464.          TabIndex        =   37
  465.          Top             =   4200
  466.          Width           =   1455
  467.       End
  468.       Begin VB.Label Label1 
  469.          Alignment       =   1  'Right Justify
  470.          BackStyle       =   0  'Transparent
  471.          Caption         =   "Student Name:"
  472.          Height          =   255
  473.          Index           =   0
  474.          Left            =   360
  475.          TabIndex        =   26
  476.          Top             =   2400
  477.          Width           =   1455
  478.       End
  479.       Begin VB.Label Label1 
  480.          Alignment       =   1  'Right Justify
  481.          BackStyle       =   0  'Transparent
  482.          Caption         =   "I.D. No:"
  483.          Height          =   255
  484.          Index           =   1
  485.          Left            =   480
  486.          TabIndex        =   25
  487.          Top             =   2760
  488.          Width           =   1335
  489.       End
  490.       Begin VB.Label Label1 
  491.          Alignment       =   1  'Right Justify
  492.          BackStyle       =   0  'Transparent
  493.          Caption         =   "Yr / Section:"
  494.          Height          =   255
  495.          Index           =   2
  496.          Left            =   720
  497.          TabIndex        =   24
  498.          Top             =   3120
  499.          Width           =   1095
  500.       End
  501.       Begin VB.Label Label1 
  502.          Alignment       =   1  'Right Justify
  503.          BackStyle       =   0  'Transparent
  504.          Caption         =   "Address:"
  505.          Height          =   255
  506.          Index           =   3
  507.          Left            =   960
  508.          TabIndex        =   23
  509.          Top             =   3480
  510.          Width           =   855
  511.       End
  512.       Begin VB.Label Label1 
  513.          Alignment       =   1  'Right Justify
  514.          BackStyle       =   0  'Transparent
  515.          Caption         =   "Tell:"
  516.          Height          =   255
  517.          Index           =   4
  518.          Left            =   1440
  519.          TabIndex        =   22
  520.          Top             =   3840
  521.          Width           =   375
  522.       End
  523.       Begin VB.Label Label3 
  524.          Appearance      =   0  'Flat
  525.          BackColor       =   &H80000005&
  526.          BorderStyle     =   1  'Fixed Single
  527.          BeginProperty Font 
  528.             Name            =   "Tahoma"
  529.             Size            =   8.25
  530.             Charset         =   0
  531.             Weight          =   400
  532.             Underline       =   0   'False
  533.             Italic          =   0   'False
  534.             Strikethrough   =   0   'False
  535.          EndProperty
  536.          ForeColor       =   &H80000008&
  537.          Height          =   375
  538.          Left            =   1920
  539.          TabIndex        =   38
  540.          Top             =   4200
  541.          Width           =   1935
  542.       End
  543.       Begin VB.Image Image5 
  544.          Height          =   4980
  545.          Left            =   0
  546.          Picture         =   "borrowing.frx":7D4AC
  547.          Stretch         =   -1  'True
  548.          Top             =   0
  549.          Width           =   4635
  550.       End
  551.    End
  552.    Begin VB.Image Image10 
  553.       Height          =   825
  554.       Left            =   0
  555.       Picture         =   "borrowing.frx":C49C6
  556.       Top             =   0
  557.       Width           =   3330
  558.    End
  559.    Begin VB.Image Image3 
  560.       Height          =   555
  561.       Left            =   -120
  562.       Picture         =   "borrowing.frx":CD98C
  563.       Stretch         =   -1  'True
  564.       Top             =   0
  565.       Width           =   9570
  566.    End
  567.    Begin VB.Image Image2 
  568.       Height          =   1395
  569.       Left            =   0
  570.       Picture         =   "borrowing.frx":D301A
  571.       Stretch         =   -1  'True
  572.       Top             =   5640
  573.       Width           =   9570
  574.    End
  575.    Begin VB.Image Image1 
  576.       Height          =   7455
  577.       Left            =   0
  578.       Picture         =   "borrowing.frx":D86A8
  579.       Stretch         =   -1  'True
  580.       Top             =   -120
  581.       Width           =   9450
  582.    End
  583. End
  584. Attribute VB_Name = "Form2"
  585. Attribute VB_GlobalNameSpace = False
  586. Attribute VB_Creatable = False
  587. Attribute VB_PredeclaredId = True
  588. Attribute VB_Exposed = False
  589. Dim dn As Database
  590. Dim tn As Recordset
  591.     Dim tn1 As Recordset
  592.     Dim tn2 As Recordset
  593.    
  594.     Dim all, all1
  595.     
  596.     
  597.     Option Compare Text
  598.     
  599.     
  600.     
  601.     
  602.     Private Sub Form_Load()
  603.     Set dn = OpenDatabase(App.Path + "\SADconvert.mdb")
  604.     Set tn = dn.OpenRecordset("book table", dbOpenDynaset)
  605.     Set tn1 = dn.OpenRecordset("student table", dbOpenDynaset)
  606.     Set tn2 = dn.OpenRecordset("borrowed material", dbOpenDynaset)
  607.       
  608.     End Sub
  609.  
  610. '===================================================Extra
  611. Private Sub Calendar1_Click()
  612.  
  613. Text12.Text = Calendar1.Value
  614. Calendar1.Visible = False
  615.  
  616. End Sub
  617.  
  618.  
  619. Private Sub Command1_Click()
  620. Calendar1.Visible = True
  621. End Sub
  622.  
  623.  
  624.  
  625.  
  626. Private Sub Timer1_Timer()
  627. Label3.Caption = Format(Date, "mm/dd/yy")
  628. Label2.Caption = Time
  629. Label2.Caption = Label3.Caption + " , " + Label2.Caption
  630. End Sub
  631.  
  632.  
  633. '=====================================================Commnands
  634. Private Sub CMDclose_Click()
  635. Form1.Show
  636. Unload Me
  637. End Sub
  638.  
  639. Private Sub CMDrefresh_Click()
  640. delete
  641. End Sub
  642.  
  643.  
  644. Private Sub CMDview_Click()
  645. Form7.Show
  646. Unload Me
  647. End Sub
  648.  
  649.  
  650. Private Sub CMDsearch_Click()
  651. Dim sw As Boolean
  652. Dim sw1 As Boolean
  653. Dim sw2 As Boolean
  654.  
  655. tn1.MoveFirst
  656.  Do Until tn1.EOF
  657.   If Text2.Text = tn1!IDNO Then
  658.    sw = True
  659.    Exit Do
  660.   End If
  661. tn1.MoveNext
  662.  Loop
  663.   
  664.   If sw = False Then
  665.    MsgBox "No Student Record Found!!!", vbOKOnly + vbInformation, "Search"
  666.    Text6.SetFocus
  667.    SendKeys "{Home}+{End}"
  668.   Else
  669.   all = 1
  670.    With tn1
  671.     Text1.Text = !STUDENTNAME
  672.     Text2.Text = !IDNO
  673.     Text3.Text = !YRSEC
  674.     Text4.Text = !ADDRESS
  675.     Text5.Text = !TELL
  676.    End With
  677.   End If
  678.  
  679.  
  680.  
  681.  
  682.  
  683.  
  684. tn.MoveFirst
  685.  Do Until tn.EOF
  686.   If Text9.Text = tn!AQUISITIONNO Then
  687.    sw1 = True
  688.    
  689.    Exit Do
  690.   End If
  691. tn.MoveNext
  692.  Loop
  693.   
  694.   If sw1 = True Then
  695.   all1 = 1
  696.    With tn
  697.     On Error Resume Next
  698.     Text8.Text = !TITLEOFTHEBOOK
  699.     Text9.Text = !AQUISITIONNO
  700.     Text10.Text = !AUTHOR
  701.     Text11.Text = !PUBLISHER
  702.     Combo1.Text = !Status
  703.     Text12.Text = !duedate
  704.    End With
  705.   Else
  706.    MsgBox "No Book Record Found!!!", vbOKOnly + vbInformation, "Search"
  707.    If all = 1 Then
  708.    Text7.SetFocus
  709.    SendKeys "{Home}+{End}"
  710.    ElseIf all <> 1 And all1 <> 1 Then
  711.    Text6.SetFocus
  712.    SendKeys "{Home}+{End}"
  713.    
  714.    End If
  715.  
  716.   End If
  717.   
  718.   
  719.   
  720.   
  721. End Sub
  722.  
  723. Private Sub CMDsave_Click()
  724. Dim sw2, sw1 As Boolean
  725.  
  726. CMDsearch.Value = True
  727.  
  728. If Combo1.Text = "Not-Available" Then
  729.  MsgBox "The book is not Available"
  730.  
  731.  
  732. ElseIf all = 1 And all1 = 1 Then
  733.     tn2.MoveFirst
  734.      Do Until tn2.EOF
  735.       If Text2.Text = tn2!IDNO Then
  736.        sw2 = True
  737.        Exit Do
  738.       End If
  739.     tn2.MoveNext
  740.      Loop
  741.         
  742.       If sw2 = False Then
  743.        If Text12.Text = "" Then
  744.           MsgBox "The due date is not set", vbOKOnly + vbInformation, "Saving"
  745.        Else
  746.             tn2.AddNew
  747.              tn2!STUDENTNAME = Text1.Text
  748.              tn2!IDNO = Text2.Text
  749.              tn2!TITLEOFTHEBOOK = Text8.Text
  750.              tn2!AQUISITIONNO = Text9.Text
  751.              tn2!duedate = Text12.Text
  752.             tn2.Update
  753.             MsgBox "The borrowers information was save!!", vbOKOnly + vbInformation, "Borrowing"
  754.         
  755.         
  756.             tn.MoveFirst
  757.              Do Until tn.EOF
  758.               If Text9.Text = tn!AQUISITIONNO Then
  759.                sw1 = True
  760.                Exit Do
  761.               End If
  762.             tn.MoveNext
  763.              Loop
  764.              
  765.               If sw1 = True Then
  766.                tn.Edit
  767.                 tn!Status = "Not-Available"
  768.                tn.Update
  769.               End If
  770.         End If
  771.        
  772.        
  773.       Else
  774.        MsgBox "The borrower has a previos account in borrowing of book. they have to borrow one at a time", vbOKOnly + vbInformation, "Borrowing"
  775.       End If
  776.  
  777.     
  778.        
  779.  
  780. End If
  781.  
  782. End Sub
  783.  
  784.  
  785. '==============================================others
  786.  
  787. Private Sub Text6_Change()
  788. Dim sw As Boolean
  789. Text1.Text = ""
  790. Text2.Text = ""
  791. Text3.Text = ""
  792. Text4.Text = ""
  793. Text5.Text = ""
  794. tn1.MoveFirst
  795.  Do Until tn1.EOF
  796.   If tn1!IDNO Like Text6.Text + "*" Then
  797.    sw = True
  798.    Exit Do
  799.   End If
  800. tn1.MoveNext
  801.  Loop
  802.   
  803.   If sw = True Then
  804.    With tn1
  805.     Text1.Text = !STUDENTNAME
  806.     Text2.Text = !IDNO
  807.     Text3.Text = !YRSEC
  808.     Text4.Text = !ADDRESS
  809.     Text5.Text = !TELL
  810.    End With
  811.   End If
  812.  
  813. End Sub
  814.  
  815. Private Sub Text7_Change()
  816. Dim sw1 As Boolean
  817. Dim sw2 As Boolean
  818. Text8.Text = ""
  819. Text9.Text = ""
  820. Text10.Text = ""
  821. Text11.Text = ""
  822. Text12.Text = ""
  823.  
  824. tn.MoveFirst
  825.  Do Until tn.EOF
  826.   If tn!AQUISITIONNO Like Text7.Text + "*" Then
  827.    sw1 = True
  828.    Exit Do
  829.   End If
  830. tn.MoveNext
  831.  Loop
  832.   
  833.   If sw1 = True Then
  834.    With tn
  835.    On Error Resume Next
  836.     Text8.Text = !TITLEOFTHEBOOK
  837.     Text9.Text = !AQUISITIONNO
  838.     Text10.Text = !AUTHOR
  839.     Text11.Text = !PUBLISHER
  840.     Combo1.Text = !Status
  841.     Text12.Text = !duedate
  842.    End With
  843.   End If
  844.  
  845.  
  846. End Sub
  847.  
  848.  
  849. Public Sub delete()
  850. Text1.Text = ""
  851. Text2.Text = ""
  852. Text3.Text = ""
  853. Text4.Text = ""
  854. Text5.Text = ""
  855. Text6.Text = ""
  856. Text7.Text = ""
  857. Text8.Text = ""
  858. Text9.Text = ""
  859. Text10.Text = ""
  860. Text11.Text = ""
  861. Text12.Text = ""
  862. End Sub
  863.